# == Schema Information
#
# Table name: wiki_categories
#
#  id           :integer          not null, primary key
#  title        :string
#  weight       :integer          default(0)
#  wiki_counter :integer          default(0)
#  ancestry     :string
#  created_at   :datetime         not null
#  updated_at   :datetime         not null
#  deleted_at   :datetime
#

class WikiCategory < ApplicationRecord
  acts_as_paranoid

  validates :title, presence: { message: "名称不能为空" }
  validates :title, uniqueness: { message: "名称不能重复" }

  has_many :wikis#, dependent: :destroy

end
